package com.blog.dxxr.blogfront.Service.Impl;

import com.blog.dxxr.blogfront.Domain.ArticleComment;
import com.blog.dxxr.blogfront.Mapper.ArticleCommentMapper;
import com.blog.dxxr.blogfront.Service.ArticleCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleCommentServiceImpl implements ArticleCommentService {
    @Autowired
    private ArticleCommentMapper articleCommentMapper;


    @Override
    public int saveCommentWithArticle(ArticleComment articleComment) {
        return articleCommentMapper.saveCommentWithArticle(articleComment);
    }

    @Override
    public List<ArticleComment> queryCommentByArticleId(String articleid) {
        return articleCommentMapper.selectCommentByArticleId(articleid);
    }

    @Override
    public int selectCommentTotalByArticleId(String articleid) {
        return articleCommentMapper.selectCommentTotalByArticleId(articleid);
    }
}
